/*
 * Store all student related info
 */
package com.spartancoder.accommodation.beans;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 *
 * @author andrei
 */
public class StudentBean {

	private int studentId,  collegeId;
	private String firstName,  lastName,  cnp,  email;
	private boolean active;

	public void fill(ResultSet rs) throws SQLException {
		setStudentId(rs.getInt("student_id"));
		setCollegeId(rs.getInt("college_id"));
		setFirstName(rs.getString("first_name"));
		setLastName(rs.getString("last_name"));
		setCnp(rs.getString("cnp"));
		setEmail(rs.getString("email"));
		setActive(rs.getBoolean("active"));
	}

	public boolean isActive() {
		return active;
	}

	public void setActive(boolean active) {
		this.active = active;
	}

	public String getCnp() {
		return cnp;
	}

	public void setCnp(String cnp) {
		this.cnp = cnp;
	}

	public int getCollegeId() {
		return collegeId;
	}

	public void setCollegeId(int collegeId) {
		this.collegeId = collegeId;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public int getStudentId() {
		return studentId;
	}

	public void setStudentId(int studentId) {
		this.studentId = studentId;
	}
}
